<?php
$action	= isset($_REQUEST["act"]) ? $_REQUEST['act'] : "";
$order	= isset($_REQUEST["order"]) ? $_REQUEST['order'] : "";
$userId	= isset($_REQUEST["userId"]) ? $_REQUEST['userId'] : "0";
$topicId = isset($_REQUEST["topicId"]) ? $_REQUEST['topicId'] : "0";
$svId = isset($_REQUEST["svId"]) ? $_REQUEST['svId'] : "0";
$page_list  = isset($_REQUEST["inpage"]) && $_REQUEST["inpage"]>0? $_REQUEST['inpage'] : "1";
//include( "CTopic.php" );
include( "CTopic.php" );
global $page_title;
//$page_title = "Topic control panel";
$page_title = "Topics management";
switch ( $action ) {
	case 'addTopic':
            CTopic::add_Topic();
            break;
        case 'viewTopic':
            CTopic::view_Topic($topicId);
            break;
        case 'editTopic':
            CTopic::edit_Topic($topicId);
            break;
        case 'deleteTopic':
            CTopic::delete_Topic($topicId);
            break;
        case 'regTopic':
            CTopic::reg_Topic($topicId);
            break;
        case 'unregTopic':
            CTopic::unreg_Topic($topicId);
            break;
        case 'acceptTopic':
            CTopic::accept_Topic($topicId);
            break;
        case 'ok':
            CTopic::ok($topicId,$svId);
            break;
        case 'notok':
            CTopic::notOk($topicId, $svId);
            break;
        case 'showall':default:
            CTopic::showall($page_list);
            break;
}
?>



